package com.ccz.demo.design.builder.computer;

import com.alibaba.fastjson.JSON;

/**
 * @ClassName Test
 * @Author caihaoyun
 * @Date 2020/5/28
 * @Version V1.0
 **/
public class Test {

    public static void main(String[] args) {
//        AssemblerBuilder assemblerBuilder = new AssemblerBuilder();
//        Director director = new Director(assemblerBuilder);
//        Computer computer = director.createComputer("i5-8500","三星520固态","微星迫击炮360M", "金士顿16G" );

        ComputerBuildSelf computer = ComputerBuildSelf.basic().computerCase("机箱").mouse("额外的鼠标").mousePad("额外的鼠标垫").build();
        System.out.println(JSON.toJSONString(computer));

    }
}
    // 自己坐自己的建造者
//
//    ComputerB computerB = new ComputerB.ComputerBuilder("主板", "cpu", "hd", "电源", "显卡").setOther("其他").build();
//
//        System.out.println("建造者电脑" + computerB.toString());